from django.urls import include, path
from rest_framework.routers import DefaultRouter

from operator_goods.views import CategoryOperateViewset, BrandOperateViewset, HotSearchWordsOperateViewset, \
    GoodsOperateViewset, BannerOperateViewset, DiscountOperateViewset, SearchAdViewset, NewGoodsViewSet, \
    HighpointGoodsViewSet, HotGoodsViewSet, CartReViewset, CartOptGoodsViewset, NewOptnewGoodsViewset, \
    HotOptnewGoodsViewset, HighpointOptnewGoodsViewset, DiscounMenuViewset, GoodsListViewset, GoodsAttributeViewset, \
    DiscountOptnewGoodsViewset, DepotGoodsListViewset, CategoryIndexOperateViewset, GoodsBannerImgViewset, \
    GoodsDescImgViewset, RelevanceGoodsViewset

router = DefaultRouter()
router.register(r'category', CategoryOperateViewset, base_name='categoryoperator')  # 商品分类
router.register(r'categoryindex', CategoryIndexOperateViewset, base_name='categoryindexr')  # 商品分类是否首页显示
router.register(r'brand', BrandOperateViewset, base_name='brandoperator')  # 商品品牌
router.register(r'hotsearchwords', HotSearchWordsOperateViewset, base_name='hotsearchwords')  # 搜索栏下方热搜词
router.register(r'goodslist', GoodsListViewset, base_name='goodslist')  # 商品列表页
router.register(r'depotgoodslist', DepotGoodsListViewset, base_name='depotgoodslist')  # 仓库中的商品列表页
router.register(r'goods', GoodsOperateViewset, base_name='goods')  # 商品
router.register(r'relevancegoods', RelevanceGoodsViewset, base_name='relevancegoods')  # 关联商品
router.register(r'attribute', GoodsAttributeViewset, base_name='attribute')  # 商品属性
router.register(r'goodsbanner', GoodsBannerImgViewset, base_name='goodsbannerimg')  # 商品详情页轮播图
router.register(r'goodsdesc', GoodsDescImgViewset, base_name='goodsdescimg')  # 商品详情页详情图
router.register(r'banner', BannerOperateViewset, base_name='banner')  # 首页轮播图
router.register(r'disoptgoods', DiscountOptnewGoodsViewset, base_name='disoptgoods')  # 优惠套餐可选商品
router.register(r'discount', DiscountOperateViewset, base_name='discount')  # 优惠套餐
router.register(r'discountmenu', DiscounMenuViewset, base_name='discountmenu')  # 优惠套餐切换按钮
router.register(r'searchad', SearchAdViewset, base_name='searchad')  # 搜索框下方广告
router.register(r'newoptgoods', NewOptnewGoodsViewset, base_name='newoptgoods')  # 新品专享可选商品
router.register(r'newgoods', NewGoodsViewSet, base_name='newgoods')  # 新品专享
router.register(r'highpointgoods', HighpointOptnewGoodsViewset, base_name='highpointgoods')  # 高端榜的可选商品
router.register(r'highpoint', HighpointGoodsViewSet, base_name='highpointgoods')  # 高端榜
router.register(r'hotoptgoods', HotOptnewGoodsViewset, base_name='hotoptgoods')  # 热销榜的可选商品
router.register(r'hotgoods', HotGoodsViewSet, base_name='highpoint')  # 热销榜
router.register(r'coptgoods', CartOptGoodsViewset, base_name='coptgoods')  # 购物车商品推荐的可选商品
router.register(r'cartre', CartReViewset, base_name='cartre')  # 购物车推荐商品

urlpatterns = [
    path('', include(router.urls)),
]
